import 'package:flutter_test/flutter_test.dart';
import 'package:kyc_face_plugin/kyc_face_plugin.dart';
import 'package:kyc_face_plugin/kyc_face_plugin_platform_interface.dart';
import 'package:kyc_face_plugin/kyc_face_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockKycFacePluginPlatform
    with MockPlatformInterfaceMixin
    implements KycFacePluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<String?> getMetaInfos() {
    return Future.value("getMetaInfos");
  }

  @override
  Future<void> init() {
    return Future.value();
  }

  @override
  Future<String?> verify(String key, String value) {
    return Future.value("1001");
  }
}

void main() {
  final KycFacePluginPlatform initialPlatform = KycFacePluginPlatform.instance;

  test('$MethodChannelKycFacePlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelKycFacePlugin>());
  });

  test('getPlatformVersion', () async {
    KycFacePlugin kycFacePlugin = KycFacePlugin();
    MockKycFacePluginPlatform fakePlatform = MockKycFacePluginPlatform();
    KycFacePluginPlatform.instance = fakePlatform;

    expect(await kycFacePlugin.getPlatformVersion(), '42');
  });
}
